package com.dream21th.flow.common.exception;

import com.dream21th.flow.common.enums.RtnEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@ToString(callSuper = true)
public class CommonException extends RuntimeException {

	private static final long serialVersionUID = 1L;

	@Setter
	@Getter
	private String code;

	public CommonException(String code, String message) {
		super(message);
		this.code = code;
	}

	public CommonException(RtnEnum ee) {

		this(ee.getCode(), ee.getMessage());
	}

	public CommonException(String message){
	    super(message);
	}

}
